package com.ims.core.doc.service.impl;

import java.util.List;
import com.ims.common.utils.DateUtils;
import com.ims.core.doc.domain.TScSettleSalInvoice;
import com.ims.core.doc.mapper.TScSettleSalInvoiceMapper;
import com.ims.core.doc.service.ITScSettleSalInvoiceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 结算单销项票多对多Service业务层处理
 *
 * @author IMS
 * @date 2024-10-07
 */
@Service
public class TScSettleSalInvoiceServiceImpl implements ITScSettleSalInvoiceService
{
    @Autowired
    private TScSettleSalInvoiceMapper tScSettleSalInvoiceMapper;

    /**
     * 查询结算单销项票多对多
     *
     * @param id 结算单销项票多对多主键
     * @return 结算单销项票多对多
     */
    @Override
    public TScSettleSalInvoice selectTScSettleSalInvoiceById(Long id)
    {
        return tScSettleSalInvoiceMapper.selectTScSettleSalInvoiceById(id);
    }

    /**
     * 查询结算单销项票多对多列表
     *
     * @param tScSettleSalInvoice 结算单销项票多对多
     * @return 结算单销项票多对多
     */
    @Override
    public List<TScSettleSalInvoice> selectTScSettleSalInvoiceList(TScSettleSalInvoice tScSettleSalInvoice)
    {
        return tScSettleSalInvoiceMapper.selectTScSettleSalInvoiceList(tScSettleSalInvoice);
    }

    /**
     * 新增结算单销项票多对多
     *
     * @param tScSettleSalInvoice 结算单销项票多对多
     * @return 结果
     */
    @Override
    public int insertTScSettleSalInvoice(TScSettleSalInvoice tScSettleSalInvoice)
    {
        tScSettleSalInvoice.setCreateTime(DateUtils.getNowDate());
        return tScSettleSalInvoiceMapper.insertTScSettleSalInvoice(tScSettleSalInvoice);
    }

    /**
     * 修改结算单销项票多对多
     *
     * @param tScSettleSalInvoice 结算单销项票多对多
     * @return 结果
     */
    @Override
    public int updateTScSettleSalInvoice(TScSettleSalInvoice tScSettleSalInvoice)
    {
        tScSettleSalInvoice.setUpdateTime(DateUtils.getNowDate());
        return tScSettleSalInvoiceMapper.updateTScSettleSalInvoice(tScSettleSalInvoice);
    }

    /**
     * 批量删除结算单销项票多对多
     *
     * @param ids 需要删除的结算单销项票多对多主键
     * @return 结果
     */
    @Override
    public int deleteTScSettleSalInvoiceByIds(Long[] ids)
    {
        return tScSettleSalInvoiceMapper.deleteTScSettleSalInvoiceByIds(ids);
    }

    /**
     * 删除结算单销项票多对多信息
     *
     * @param id 结算单销项票多对多主键
     * @return 结果
     */
    @Override
    public int deleteTScSettleSalInvoiceById(Long id)
    {
        return tScSettleSalInvoiceMapper.deleteTScSettleSalInvoiceById(id);
    }
}
